Run the wasm-jit library test in docker - #291
Merged
Merged
Conversation
The wasm-jit target needs the Rust omc, which the test nodes run too old an Ubuntu to build. Build it in the image the OpenModelica job uses, and run test.py there as well: an omc built against that image's glibc does not run on the node. Everything using the node's own omc (installing the libraries, the reference files, the database and publishing) stays outside. `runRegressiontest` takes the directory of a Dockerfile; when given, the checkout+build script and the test.py script run through `.inside()` instead of `sh`. The testing repository is checked out before the omc build, since it provides that Dockerfile. The image adds what the test tool needs on top of the build deps: | Added | Needed for | |--------------------------|-------------------------------------------| | rsync, openssh-client | publishing the results | | time, psmisc | `time ./test.py`, `killall omc` | | venv from requirements | joblib, monotonic, natsort, psutil, ... | | omc (stable) | --ompython_omhome, mos-file generation | The image's own venv only carries ompython and simplejson, and its apt sources point at the nightly component, so the sources list is switched to stable for a released reference omc. Mounts: the node's home (the cached omc build, the libraries used as HOME during the run, the ssh key), /mnt/ReferenceFiles read-write since test.py caches a hash next to every reference file, /etc/passwd because ssh refuses to run for a uid it cannot look up, and the cargo registry volume of the OpenModelica job. --init reaps the omc processes test.py orphans. sccache now starts inside the build script: a server started outside the container is of no use in it. Being the same image as the OpenModelica job also means its cache can hit at all, which it could not against a toolchain on the node, so the C parts get a compiler launcher too. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The wasm-jit target needs the Rust omc, which the test nodes run too old an Ubuntu to build. Build it in the image the OpenModelica job uses, and run test.py there as well: an omc built against that image's glibc does not run on the node. Everything using the node's own omc (installing the libraries, the reference files, the database and publishing) stays outside.
runRegressiontesttakes the directory of a Dockerfile; when given, the checkout+build script and the test.py script run through.inside()instead ofsh. The testing repository is checked out before the omc build, since it provides that Dockerfile.The image adds what the test tool needs on top of the build deps:
time ./test.py,killall omcThe image's own venv only carries ompython and simplejson, and its apt sources point at the nightly component, so the sources list is switched to stable for a released reference omc.
Mounts: the node's home (the cached omc build, the libraries used as HOME during the run, the ssh key), /mnt/ReferenceFiles read-write since test.py caches a hash next to every reference file, /etc/passwd because ssh refuses to run for a uid it cannot look up, and the cargo registry volume of the OpenModelica job. --init reaps the omc processes test.py orphans.
sccache now starts inside the build script: a server started outside the container is of no use in it. Being the same image as the OpenModelica job also means its cache can hit at all, which it could not against a toolchain on the node, so the C parts get a compiler launcher too.